import pytest,os,allure,time
from Tools.Tools import emaili,rizhi
time = time.strftime('%Y%m%d-%H%M%S')
if __name__ == '__main__':
    rizhi(time)
    # pytest.main([r'./TestCase/Test_case.py','-s','--alluredir=allure-results'])
    # os.system('allure generate allure-results -o allure-report --clean')
    # if __name__ == '__main__':
    #     pytest.main(['./TestCase/Test_unittest.py', '-s', '--alluredir=allure-results'])
    #     os.system('allure generate allure-results -o allure-report --clean')


    pytest.main(['./TestCase/Test_case.py','-s',f'--alluredir={time}allure-results'])
    os.system(f'allure generate allure-results -o {time}allure-report')
    emaili([f'./{time}.log',f'./{time}allure-report/index.html'])
